1. Field
Embodiments relate to a method, system, and program for managing data in a system of data organization, such as a RAID system.
2. Description of the Related Art
Various techniques have been proposed for organizing data stored in data storage devices such as disk drives. One such data storage organization is referred to as Redundant Array of Independent (or Inexpensive) Disks or (RAID). In a RAID organization, two or more disk drives are employed in combination to improve fault tolerance or performance, or both. There are different types of RAID data storage organizations and these different types are often referred to as RAID “levels 0, 1, 2 . . . .
In a RAID level 0 data organization, for example, the data of a user file is “striped”, that is, blocks of user data are spread across multiple disks to improve performance. However, there is generally no redundancy provided for recovery of data should one of the drives fail in a RAID level 0 organization of data. A RAID level 3 organization of data is similar to RAID level 0 but one disk is typically reserved to store error correction data, often referred to as “parity data.” This parity data may be used to reconstruct lost user data should one of the drives fail. In a RAID level 5 data organization, parity data is provided for each stripe of data across the array of disk drives and no particular disk drive is dedicated to storing the parity data. Instead, blocks of parity data for the stripes of user data are distributed throughout all the disks of the array, to further improve performance.
In one RAID-5 organization, there is one block of parity data for each stripe of data across the array of disk drives. Such an arrangement provides ready reconstruction of data should one drive fail. For example, if a stripe of data includes four blocks of data and one block of parity data, if one of the blocks of the stripe becomes lost due to drive failure, data corruption or other types of failures, the lost block can be reconstructed using the surviving four blocks of the stripe.
FIG. 1 illustrates one example of prior art logical operations which may be performed to rebuild lost data. If a stripe n of data has four blocks of data and one block of parity data, and data of one block from stripe n is lost, the lost data can be reconstructed using a sub-block of good data from the three good blocks of data and a sub-block of good parity data from the good parity block of stripe n. Thus, in the example of FIG. 1, an Exclusive-OR function is performed on a first sub-block 30 of good data from one good block of data from stripe n, and a second sub-block 32 of good data from a second good block of data from stripe n. The result of the Exclusive-OR logical operation can be Exclusive-OR'ed with another sub-block 33 of good data from a third good block of data from stripe n. The result of that Exclusive-OR logical operation can be Exclusive-OR'ed with a sub-block 34 of good parity data from the good parity block from stripe n, to reconstruct a sub-block 36 of data to replace the lost sub-block of data. If an entire block of data is lost from a stripe, the entire block can be reconstructed repeating the operations of FIG. 1 for each sub-block of the block.
FIG. 2 shows an example of a prior art logic engine 50 of a RAID storage processor for reconstructing lost data of RAID storage units in accordance with the logic functions of FIG. 1. The logic engine 50 has a store queue 52 which can perform an Exclusive-OR logical function on the contents of the store queue 52 as represented by an arrow 54, and the data being presented at its input as represented by an arrow 56. The Intel 80303 integrated circuit chip has a similar logic engine referred to as an Application Accelerator Unit (AAU).
Operations of reading data and processing the read data using the logic engine 50 in reconstructing data is represented in FIG. 3. Upon resetting (process block 60) the store queue 52, a block of good data may be read (process block 62) in a first read operation 63 (FIG. 2) from a stripe n of a disk drive 64a of a RAID array 66 to a local memory 68 of a storage processor or controller. Another block of good data may be read (process block 62) in a second read operation 70 from the stripe n of a disk drive 64b of the RAID array 66 to the local memory 68 of a storage processor or controller. A third block of good data may be read (process block 62) in a third read operation 72 from the stripe n of a disk drive 64c of the RAID array 66 to the local memory 68. A block of good parity data may be read (process block 62) in a fourth read operation 74 from the stripe n of a disk drive 64e of the RAID array 66 to the local memory 68.
Once all of the good blocks of data and parity data have been read (process block 80) from the stripe, a sub-block of the data read from the disk drive 64a may be read (process block 82) from the local memory 68 in a portion of a fifth read operation 84 and stored in the store queue 52. This data may be for example, the sub-block of data 30 of FIG. 1. Since the store queue 52 was previously reset, the data 30 which originated from the drive 64a may be stored in the store queue 52 by performing an Exclusive-OR function with the data 30 read from the local memory 68 and the reset contents of the store queue 52. The size of the read operations from the local memory 68 to the logic engine 50 will typically depend upon the capacity of the store queue 52. Thus, if, for example, the capacity of the store queue 52 is 1 K bytes, the read operation 84 will continue until the store queue 52 is filled with 1 K bytes of the data 30.
A sub-block of the next block of data from the stripe n, that is, a sub-block of the block of data read from the disk drive 64b may be read (process block 86) from the local memory 68 in a portion of sixth read operation 90. This data may be for example, the sub-block 32 of data of FIG. 1. The sub-block 32 of data from the block of data read from the drive 64b is Exclusive-OR'ed (process block 88) with the sub-block 30 of data previously stored in the store queue 52, and stored as an intermediate result in the store queue 52.
A sub-block 33 (FIG. 1) of the next block of data from the stripe n, that is, a sub-block of the block of data read from the disk drive 64c may be read (process block 86) from the local memory 68 in a portion of seventh read operation 92. The sub-block 33 of data from the block of data read from the drive 64c is Exclusive-ORed (process block 88) with the contents of the store queue 52, and stored as an intermediate result in the store queue 52.
A sub-block 34 (FIG. 1) of the parity data block of data from the stripe n, that is, the sub-block of the block of data read from the disk drive 64e may be read (process block 86) from the local memory 68 in a portion of an eighth read operation 94. The sub-block 34 of parity data from the parity block of read from the drive 64e is Exclusive-OR'ed (process block 88) with the contents of the store queue 52, and stored as an intermediate result in the store queue 52.
Once all of the corresponding sub-blocks of the good blocks of data and parity of the stripe n have been received and processed (process block 95), the intermediate result stored in the store queue 52 is the rebuilt sub-block 36 of stripe n which may be written (process block 96) to the local memory 68 in a portion of a write operation 96 to be written to the disk drive 64d in a subsequent write operation 97 to replace the lost sub-block.
The process of FIG. 3 may be repeated for each sub-block of the blocks of the stripe n until all the sub-blocks have been received (process block 98) and processed by the logic engine 50 wherein an entire block of the stripe n may be reconstructed, if needed. Moreover, if all of the data of the drive 64d, for example has been lost, the process may be repeated for each stripe of the array 66 of the disk drives until every block of the damaged disk drive 64d has been reconstructed. The process of constructing new parity data when updating old data with new data in a RAID type data organization is similar.
Notwithstanding, there is a continued need in the art to improve the performance of processors in data storage organization.